package com.wetao.lib_common.greendao.dao;

import java.util.List;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.query.Query;
import org.greenrobot.greendao.query.QueryBuilder;

import com.wetao.lib_common.greendao.model.WireQuestion;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table "WIRE_QUESTION".
*/
public class WireQuestionDao extends AbstractDao<WireQuestion, Long> {

    public static final String TABLENAME = "WIRE_QUESTION";

    /**
     * Properties of entity WireQuestion.<br/>
     * Can be used for QueryBuilder and for referencing column names.
     */
    public static class Properties {
        public final static Property Id = new Property(0, Long.class, "id", true, "_id");
        public final static Property QuestionId = new Property(1, Integer.class, "questionId", false, "QUESTION_ID");
        public final static Property State = new Property(2, Integer.class, "state", false, "STATE");
        public final static Property QuestionNo = new Property(3, Integer.class, "questionNo", false, "QUESTION_NO");
        public final static Property QuestionScore = new Property(4, Float.class, "questionScore", false, "QUESTION_SCORE");
        public final static Property QuestionContent = new Property(5, String.class, "questionContent", false, "QUESTION_CONTENT");
        public final static Property Question = new Property(6, String.class, "question", false, "QUESTION");
        public final static Property Options = new Property(7, String.class, "options", false, "OPTIONS");
        public final static Property Explain = new Property(8, String.class, "explain", false, "EXPLAIN");
        public final static Property Answers = new Property(9, String.class, "answers", false, "ANSWERS");
        public final static Property QuestionType = new Property(10, Integer.class, "questionType", false, "QUESTION_TYPE");
        public final static Property IsSingle = new Property(11, Integer.class, "isSingle", false, "IS_SINGLE");
        public final static Property AnswerType = new Property(12, Integer.class, "answerType", false, "ANSWER_TYPE");
        public final static Property AnswerContent = new Property(13, String.class, "answerContent", false, "ANSWER_CONTENT");
        public final static Property IsRight = new Property(14, Integer.class, "isRight", false, "IS_RIGHT");
        public final static Property MyScore = new Property(15, Float.class, "myScore", false, "MY_SCORE");
        public final static Property ScreenIsView = new Property(16, Integer.class, "screenIsView", false, "SCREEN_IS_VIEW");
        public final static Property ScreenBegin = new Property(17, Integer.class, "screenBegin", false, "SCREEN_BEGIN");
        public final static Property ScreenEnd = new Property(18, Integer.class, "screenEnd", false, "SCREEN_END");
        public final static Property QuestionScreen = new Property(19, String.class, "questionScreen", false, "QUESTION_SCREEN");
        public final static Property ScreenType = new Property(20, Integer.class, "screenType", false, "SCREEN_TYPE");
        public final static Property ScreenId = new Property(21, Integer.class, "screenId", false, "SCREEN_ID");
        public final static Property ListeningUrl = new Property(22, String.class, "listeningUrl", false, "LISTENING_URL");
        public final static Property Duration = new Property(23, Integer.class, "duration", false, "DURATION");
        public final static Property ChapterId = new Property(24, Integer.class, "chapterId", false, "CHAPTER_ID");
        public final static Property IsCollect = new Property(25, Integer.class, "isCollect", false, "IS_COLLECT");
        public final static Property IsUndrestand = new Property(26, Integer.class, "isUndrestand", false, "IS_UNDRESTAND");
        public final static Property QuestionDetailId = new Property(27, Integer.class, "questionDetailId", false, "QUESTION_DETAIL_ID");
        public final static Property AnswerId = new Property(28, Integer.class, "answerId", false, "ANSWER_ID");
        public final static Property Doodle = new Property(29, String.class, "doodle", false, "DOODLE");
        public final static Property VoiceComment = new Property(30, String.class, "voiceComment", false, "VOICE_COMMENT");
        public final static Property QuestionSite = new Property(31, String.class, "questionSite", false, "QUESTION_SITE");
        public final static Property MyAnswer = new Property(32, String.class, "myAnswer", false, "MY_ANSWER");
        public final static Property IsSubjectMyAns = new Property(33, boolean.class, "isSubjectMyAns", false, "IS_SUBJECT_MY_ANS");
        public final static Property AssistantExamId = new Property(34, Long.class, "assistantExamId", false, "ASSISTANT_EXAM_ID");
    }

    private DaoSession daoSession;

    private Query<WireQuestion> wireExam_QuestionListQuery;

    public WireQuestionDao(DaoConfig config) {
        super(config);
    }
    
    public WireQuestionDao(DaoConfig config, DaoSession daoSession) {
        super(config, daoSession);
        this.daoSession = daoSession;
    }

    /** Creates the underlying database table. */
    public static void createTable(Database db, boolean ifNotExists) {
        String constraint = ifNotExists? "IF NOT EXISTS ": "";
        db.execSQL("CREATE TABLE " + constraint + "\"WIRE_QUESTION\" (" + //
                "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
                "\"QUESTION_ID\" INTEGER NOT NULL ," + // 1: questionId
                "\"STATE\" INTEGER," + // 2: state
                "\"QUESTION_NO\" INTEGER," + // 3: questionNo
                "\"QUESTION_SCORE\" REAL," + // 4: questionScore
                "\"QUESTION_CONTENT\" TEXT," + // 5: questionContent
                "\"QUESTION\" TEXT," + // 6: question
                "\"OPTIONS\" TEXT," + // 7: options
                "\"EXPLAIN\" TEXT," + // 8: explain
                "\"ANSWERS\" TEXT," + // 9: answers
                "\"QUESTION_TYPE\" INTEGER," + // 10: questionType
                "\"IS_SINGLE\" INTEGER," + // 11: isSingle
                "\"ANSWER_TYPE\" INTEGER," + // 12: answerType
                "\"ANSWER_CONTENT\" TEXT," + // 13: answerContent
                "\"IS_RIGHT\" INTEGER," + // 14: isRight
                "\"MY_SCORE\" REAL," + // 15: myScore
                "\"SCREEN_IS_VIEW\" INTEGER," + // 16: screenIsView
                "\"SCREEN_BEGIN\" INTEGER," + // 17: screenBegin
                "\"SCREEN_END\" INTEGER," + // 18: screenEnd
                "\"QUESTION_SCREEN\" TEXT," + // 19: questionScreen
                "\"SCREEN_TYPE\" INTEGER," + // 20: screenType
                "\"SCREEN_ID\" INTEGER," + // 21: screenId
                "\"LISTENING_URL\" TEXT," + // 22: listeningUrl
                "\"DURATION\" INTEGER," + // 23: duration
                "\"CHAPTER_ID\" INTEGER," + // 24: chapterId
                "\"IS_COLLECT\" INTEGER," + // 25: isCollect
                "\"IS_UNDRESTAND\" INTEGER," + // 26: isUndrestand
                "\"QUESTION_DETAIL_ID\" INTEGER," + // 27: questionDetailId
                "\"ANSWER_ID\" INTEGER," + // 28: answerId
                "\"DOODLE\" TEXT," + // 29: doodle
                "\"VOICE_COMMENT\" TEXT," + // 30: voiceComment
                "\"QUESTION_SITE\" TEXT," + // 31: questionSite
                "\"MY_ANSWER\" TEXT," + // 32: myAnswer
                "\"IS_SUBJECT_MY_ANS\" INTEGER NOT NULL ," + // 33: isSubjectMyAns
                "\"ASSISTANT_EXAM_ID\" INTEGER NOT NULL );"); // 34: assistantExamId
    }

    /** Drops the underlying database table. */
    public static void dropTable(Database db, boolean ifExists) {
        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"WIRE_QUESTION\"";
        db.execSQL(sql);
    }

    @Override
    protected final void bindValues(DatabaseStatement stmt, WireQuestion entity) {
        stmt.clearBindings();
 
        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }
        stmt.bindLong(2, entity.getQuestionId());
 
        Integer state = entity.getState();
        if (state != null) {
            stmt.bindLong(3, state);
        }
 
        Integer questionNo = entity.getQuestionNo();
        if (questionNo != null) {
            stmt.bindLong(4, questionNo);
        }
 
        Float questionScore = entity.getQuestionScore();
        if (questionScore != null) {
            stmt.bindDouble(5, questionScore);
        }
 
        String questionContent = entity.getQuestionContent();
        if (questionContent != null) {
            stmt.bindString(6, questionContent);
        }
 
        String question = entity.getQuestion();
        if (question != null) {
            stmt.bindString(7, question);
        }
 
        String options = entity.getOptions();
        if (options != null) {
            stmt.bindString(8, options);
        }
 
        String explain = entity.getExplain();
        if (explain != null) {
            stmt.bindString(9, explain);
        }
 
        String answers = entity.getAnswers();
        if (answers != null) {
            stmt.bindString(10, answers);
        }
 
        Integer questionType = entity.getQuestionType();
        if (questionType != null) {
            stmt.bindLong(11, questionType);
        }
 
        Integer isSingle = entity.getIsSingle();
        if (isSingle != null) {
            stmt.bindLong(12, isSingle);
        }
 
        Integer answerType = entity.getAnswerType();
        if (answerType != null) {
            stmt.bindLong(13, answerType);
        }
 
        String answerContent = entity.getAnswerContent();
        if (answerContent != null) {
            stmt.bindString(14, answerContent);
        }
 
        Integer isRight = entity.getIsRight();
        if (isRight != null) {
            stmt.bindLong(15, isRight);
        }
 
        Float myScore = entity.getMyScore();
        if (myScore != null) {
            stmt.bindDouble(16, myScore);
        }
 
        Integer screenIsView = entity.getScreenIsView();
        if (screenIsView != null) {
            stmt.bindLong(17, screenIsView);
        }
 
        Integer screenBegin = entity.getScreenBegin();
        if (screenBegin != null) {
            stmt.bindLong(18, screenBegin);
        }
 
        Integer screenEnd = entity.getScreenEnd();
        if (screenEnd != null) {
            stmt.bindLong(19, screenEnd);
        }
 
        String questionScreen = entity.getQuestionScreen();
        if (questionScreen != null) {
            stmt.bindString(20, questionScreen);
        }
 
        Integer screenType = entity.getScreenType();
        if (screenType != null) {
            stmt.bindLong(21, screenType);
        }
 
        Integer screenId = entity.getScreenId();
        if (screenId != null) {
            stmt.bindLong(22, screenId);
        }
 
        String listeningUrl = entity.getListeningUrl();
        if (listeningUrl != null) {
            stmt.bindString(23, listeningUrl);
        }
 
        Integer duration = entity.getDuration();
        if (duration != null) {
            stmt.bindLong(24, duration);
        }
 
        Integer chapterId = entity.getChapterId();
        if (chapterId != null) {
            stmt.bindLong(25, chapterId);
        }
 
        Integer isCollect = entity.getIsCollect();
        if (isCollect != null) {
            stmt.bindLong(26, isCollect);
        }
 
        Integer isUndrestand = entity.getIsUndrestand();
        if (isUndrestand != null) {
            stmt.bindLong(27, isUndrestand);
        }
 
        Integer questionDetailId = entity.getQuestionDetailId();
        if (questionDetailId != null) {
            stmt.bindLong(28, questionDetailId);
        }
 
        Integer answerId = entity.getAnswerId();
        if (answerId != null) {
            stmt.bindLong(29, answerId);
        }
 
        String doodle = entity.getDoodle();
        if (doodle != null) {
            stmt.bindString(30, doodle);
        }
 
        String voiceComment = entity.getVoiceComment();
        if (voiceComment != null) {
            stmt.bindString(31, voiceComment);
        }
 
        String questionSite = entity.getQuestionSite();
        if (questionSite != null) {
            stmt.bindString(32, questionSite);
        }
 
        String myAnswer = entity.getMyAnswer();
        if (myAnswer != null) {
            stmt.bindString(33, myAnswer);
        }
        stmt.bindLong(34, entity.getIsSubjectMyAns() ? 1L: 0L);
        stmt.bindLong(35, entity.getAssistantExamId());
    }

    @Override
    protected final void bindValues(SQLiteStatement stmt, WireQuestion entity) {
        stmt.clearBindings();
 
        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }
        stmt.bindLong(2, entity.getQuestionId());
 
        Integer state = entity.getState();
        if (state != null) {
            stmt.bindLong(3, state);
        }
 
        Integer questionNo = entity.getQuestionNo();
        if (questionNo != null) {
            stmt.bindLong(4, questionNo);
        }
 
        Float questionScore = entity.getQuestionScore();
        if (questionScore != null) {
            stmt.bindDouble(5, questionScore);
        }
 
        String questionContent = entity.getQuestionContent();
        if (questionContent != null) {
            stmt.bindString(6, questionContent);
        }
 
        String question = entity.getQuestion();
        if (question != null) {
            stmt.bindString(7, question);
        }
 
        String options = entity.getOptions();
        if (options != null) {
            stmt.bindString(8, options);
        }
 
        String explain = entity.getExplain();
        if (explain != null) {
            stmt.bindString(9, explain);
        }
 
        String answers = entity.getAnswers();
        if (answers != null) {
            stmt.bindString(10, answers);
        }
 
        Integer questionType = entity.getQuestionType();
        if (questionType != null) {
            stmt.bindLong(11, questionType);
        }
 
        Integer isSingle = entity.getIsSingle();
        if (isSingle != null) {
            stmt.bindLong(12, isSingle);
        }
 
        Integer answerType = entity.getAnswerType();
        if (answerType != null) {
            stmt.bindLong(13, answerType);
        }
 
        String answerContent = entity.getAnswerContent();
        if (answerContent != null) {
            stmt.bindString(14, answerContent);
        }
 
        Integer isRight = entity.getIsRight();
        if (isRight != null) {
            stmt.bindLong(15, isRight);
        }
 
        Float myScore = entity.getMyScore();
        if (myScore != null) {
            stmt.bindDouble(16, myScore);
        }
 
        Integer screenIsView = entity.getScreenIsView();
        if (screenIsView != null) {
            stmt.bindLong(17, screenIsView);
        }
 
        Integer screenBegin = entity.getScreenBegin();
        if (screenBegin != null) {
            stmt.bindLong(18, screenBegin);
        }
 
        Integer screenEnd = entity.getScreenEnd();
        if (screenEnd != null) {
            stmt.bindLong(19, screenEnd);
        }
 
        String questionScreen = entity.getQuestionScreen();
        if (questionScreen != null) {
            stmt.bindString(20, questionScreen);
        }
 
        Integer screenType = entity.getScreenType();
        if (screenType != null) {
            stmt.bindLong(21, screenType);
        }
 
        Integer screenId = entity.getScreenId();
        if (screenId != null) {
            stmt.bindLong(22, screenId);
        }
 
        String listeningUrl = entity.getListeningUrl();
        if (listeningUrl != null) {
            stmt.bindString(23, listeningUrl);
        }
 
        Integer duration = entity.getDuration();
        if (duration != null) {
            stmt.bindLong(24, duration);
        }
 
        Integer chapterId = entity.getChapterId();
        if (chapterId != null) {
            stmt.bindLong(25, chapterId);
        }
 
        Integer isCollect = entity.getIsCollect();
        if (isCollect != null) {
            stmt.bindLong(26, isCollect);
        }
 
        Integer isUndrestand = entity.getIsUndrestand();
        if (isUndrestand != null) {
            stmt.bindLong(27, isUndrestand);
        }
 
        Integer questionDetailId = entity.getQuestionDetailId();
        if (questionDetailId != null) {
            stmt.bindLong(28, questionDetailId);
        }
 
        Integer answerId = entity.getAnswerId();
        if (answerId != null) {
            stmt.bindLong(29, answerId);
        }
 
        String doodle = entity.getDoodle();
        if (doodle != null) {
            stmt.bindString(30, doodle);
        }
 
        String voiceComment = entity.getVoiceComment();
        if (voiceComment != null) {
            stmt.bindString(31, voiceComment);
        }
 
        String questionSite = entity.getQuestionSite();
        if (questionSite != null) {
            stmt.bindString(32, questionSite);
        }
 
        String myAnswer = entity.getMyAnswer();
        if (myAnswer != null) {
            stmt.bindString(33, myAnswer);
        }
        stmt.bindLong(34, entity.getIsSubjectMyAns() ? 1L: 0L);
        stmt.bindLong(35, entity.getAssistantExamId());
    }

    @Override
    protected final void attachEntity(WireQuestion entity) {
        super.attachEntity(entity);
        entity.__setDaoSession(daoSession);
    }

    @Override
    public Long readKey(Cursor cursor, int offset) {
        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
    }    

    @Override
    public WireQuestion readEntity(Cursor cursor, int offset) {
        WireQuestion entity = new WireQuestion( //
            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
            cursor.getInt(offset + 1), // questionId
            cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // state
            cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3), // questionNo
            cursor.isNull(offset + 4) ? null : cursor.getFloat(offset + 4), // questionScore
            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // questionContent
            cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // question
            cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // options
            cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // explain
            cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // answers
            cursor.isNull(offset + 10) ? null : cursor.getInt(offset + 10), // questionType
            cursor.isNull(offset + 11) ? null : cursor.getInt(offset + 11), // isSingle
            cursor.isNull(offset + 12) ? null : cursor.getInt(offset + 12), // answerType
            cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // answerContent
            cursor.isNull(offset + 14) ? null : cursor.getInt(offset + 14), // isRight
            cursor.isNull(offset + 15) ? null : cursor.getFloat(offset + 15), // myScore
            cursor.isNull(offset + 16) ? null : cursor.getInt(offset + 16), // screenIsView
            cursor.isNull(offset + 17) ? null : cursor.getInt(offset + 17), // screenBegin
            cursor.isNull(offset + 18) ? null : cursor.getInt(offset + 18), // screenEnd
            cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // questionScreen
            cursor.isNull(offset + 20) ? null : cursor.getInt(offset + 20), // screenType
            cursor.isNull(offset + 21) ? null : cursor.getInt(offset + 21), // screenId
            cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // listeningUrl
            cursor.isNull(offset + 23) ? null : cursor.getInt(offset + 23), // duration
            cursor.isNull(offset + 24) ? null : cursor.getInt(offset + 24), // chapterId
            cursor.isNull(offset + 25) ? null : cursor.getInt(offset + 25), // isCollect
            cursor.isNull(offset + 26) ? null : cursor.getInt(offset + 26), // isUndrestand
            cursor.isNull(offset + 27) ? null : cursor.getInt(offset + 27), // questionDetailId
            cursor.isNull(offset + 28) ? null : cursor.getInt(offset + 28), // answerId
            cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // doodle
            cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // voiceComment
            cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // questionSite
            cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // myAnswer
            cursor.getShort(offset + 33) != 0, // isSubjectMyAns
            cursor.getLong(offset + 34) // assistantExamId
        );
        return entity;
    }
     
    @Override
    public void readEntity(Cursor cursor, WireQuestion entity, int offset) {
        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
        entity.setQuestionId(cursor.getInt(offset + 1));
        entity.setState(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
        entity.setQuestionNo(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
        entity.setQuestionScore(cursor.isNull(offset + 4) ? null : cursor.getFloat(offset + 4));
        entity.setQuestionContent(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
        entity.setQuestion(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
        entity.setOptions(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
        entity.setExplain(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
        entity.setAnswers(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
        entity.setQuestionType(cursor.isNull(offset + 10) ? null : cursor.getInt(offset + 10));
        entity.setIsSingle(cursor.isNull(offset + 11) ? null : cursor.getInt(offset + 11));
        entity.setAnswerType(cursor.isNull(offset + 12) ? null : cursor.getInt(offset + 12));
        entity.setAnswerContent(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
        entity.setIsRight(cursor.isNull(offset + 14) ? null : cursor.getInt(offset + 14));
        entity.setMyScore(cursor.isNull(offset + 15) ? null : cursor.getFloat(offset + 15));
        entity.setScreenIsView(cursor.isNull(offset + 16) ? null : cursor.getInt(offset + 16));
        entity.setScreenBegin(cursor.isNull(offset + 17) ? null : cursor.getInt(offset + 17));
        entity.setScreenEnd(cursor.isNull(offset + 18) ? null : cursor.getInt(offset + 18));
        entity.setQuestionScreen(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
        entity.setScreenType(cursor.isNull(offset + 20) ? null : cursor.getInt(offset + 20));
        entity.setScreenId(cursor.isNull(offset + 21) ? null : cursor.getInt(offset + 21));
        entity.setListeningUrl(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
        entity.setDuration(cursor.isNull(offset + 23) ? null : cursor.getInt(offset + 23));
        entity.setChapterId(cursor.isNull(offset + 24) ? null : cursor.getInt(offset + 24));
        entity.setIsCollect(cursor.isNull(offset + 25) ? null : cursor.getInt(offset + 25));
        entity.setIsUndrestand(cursor.isNull(offset + 26) ? null : cursor.getInt(offset + 26));
        entity.setQuestionDetailId(cursor.isNull(offset + 27) ? null : cursor.getInt(offset + 27));
        entity.setAnswerId(cursor.isNull(offset + 28) ? null : cursor.getInt(offset + 28));
        entity.setDoodle(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
        entity.setVoiceComment(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
        entity.setQuestionSite(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
        entity.setMyAnswer(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
        entity.setIsSubjectMyAns(cursor.getShort(offset + 33) != 0);
        entity.setAssistantExamId(cursor.getLong(offset + 34));
     }
    
    @Override
    protected final Long updateKeyAfterInsert(WireQuestion entity, long rowId) {
        entity.setId(rowId);
        return rowId;
    }
    
    @Override
    public Long getKey(WireQuestion entity) {
        if(entity != null) {
            return entity.getId();
        } else {
            return null;
        }
    }

    @Override
    public boolean hasKey(WireQuestion entity) {
        return entity.getId() != null;
    }

    @Override
    protected final boolean isEntityUpdateable() {
        return true;
    }
    
    /** Internal query to resolve the "questionList" to-many relationship of WireExam. */
    public List<WireQuestion> _queryWireExam_QuestionList(Long assistantExamId) {
        synchronized (this) {
            if (wireExam_QuestionListQuery == null) {
                QueryBuilder<WireQuestion> queryBuilder = queryBuilder();
                queryBuilder.where(Properties.AssistantExamId.eq(null));
                wireExam_QuestionListQuery = queryBuilder.build();
            }
        }
        Query<WireQuestion> query = wireExam_QuestionListQuery.forCurrentThread();
        query.setParameter(0, assistantExamId);
        return query.list();
    }

}
